package pattern.singleton;

/**
 * @description 单例模式
 * @author fg
 * @date 2017年8月22日
 */
public class Singleton {
	private static Singleton instance = null;
	private Singleton(){
		
	}
	public static Singleton getInstance() {
		if(instance == null) {
			synchronized (instance) {
				instance = new Singleton();
			}
		}
		return instance;
	}
}
